package com.cskaoyan.market.admin.service.impl;

import com.cskaoyan.market.admin.service.MarketFootprintService;
import com.cskaoyan.market.db.domain.MarketFootprint;
import com.cskaoyan.market.db.domain.MarketFootprintExample;
import com.cskaoyan.market.db.mapper.MarketFootprintMapper;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yuanixn2158@163.com
 * @since 2023/05/09 09:54
 */
@Service
public class MarketFootprintServiceImpl implements MarketFootprintService {
    @Autowired
    private MarketFootprintMapper footprintMapper;

    @Override
    public List<MarketFootprint> getFootprintLIst(Integer page, Integer limit, String sort, String order) {
        MarketFootprintExample marketFootprintExample = new MarketFootprintExample();
        marketFootprintExample.orderBy(sort+" "+order);
        PageHelper.startPage(page,limit);
        List<MarketFootprint> marketFootprints = footprintMapper.selectByExample(marketFootprintExample);
        
        
        return marketFootprints;

    }
}
